package com.gaojinqi.sys.core.runner;

import com.gaojinqi.sys.modular.config.service.SysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 系统配置加载到缓存中
 *
 * @author gaojinqi
 * @version 1.0
 * @since 2020年04月15日
 */
@Slf4j
@Component
public class SysConfigLoadRunner implements CommandLineRunner {

    @Autowired
    private SysConfigService sysConfigService;

    @Override
    public void run(String... args) {
        sysConfigService.reload();
    }

}
